#include "heart_task.h"
#include "start_task.h"
TaskHandle_t heartHandle;
// 默认工作状态正常
int heartState = 1;
// 心跳任务
void heartTask(void* param)
{
    while (1)
    {
        if (heartState) LED0 = !LED0;// 工作状态闪烁
        else LED0 = 1;// 异常状态灭灯
        vTaskDelay(2000);
    }
}
void heart_init()
{
    ledInit();
}
void createHeartTask()
{
    xTaskCreate(
        heartTask,
        "heartTask",
        128,
        NULL,
        2,
        &heartHandle
    );
}